package com.example.service;

import com.example.entity.Student;
import com.example.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentService {
    @Autowired
    StudentMapper studentMapper;

    public void insert(Student student) {
        studentMapper.insert(student);
    }

    public void deleteByNum(Long num) {
        studentMapper.deleteByNum(num);
    }

    public void update(Student student) {
        studentMapper.update(student);
    }

    public Student findByNum(Long num){
        return studentMapper.findByNum(num);
    }

}
